import 'package:json_annotation/json_annotation.dart';
import 'image_model.dart';
part 'degrease_model.g.dart';

@JsonSerializable()
class DegreaseModel {
  bool is_purchased;
  String create_time;
  int id;
  ImageModel cover_image;
  String details_url;
  String desc;
  int n_join_users;
  int n_tasks;
  String name;
  int plan_type;
  String? release_time;
  int status;
  String tag;
  String update_time;
  int watch_type;

  DegreaseModel(
      this.is_purchased,
      this.desc,
      this.id,
      this.cover_image,
      this.name,
      this.create_time,
      this.details_url,
      this.n_join_users,
      this.n_tasks,
      this.plan_type,
      this.release_time,
      this.status,
      this.tag,
      this.update_time,
      this.watch_type);

  factory DegreaseModel.fromJson(Map<String, dynamic> json) =>
      _$DegreaseModelFromJson(json);

  Map<String, dynamic> toJson() => _$DegreaseModelToJson(this);
}
